package com.sample.util;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.sample.entity.AccountInfo;
import com.sample.entity.LoginInfo;
import com.sample.entity.PurchaseDetail;
import com.sample.entity.PurchaseInfoVO2;
import com.sample.entity.PurchaseStat;

public class BeanFactory {
	
	 
	public static List<PurchaseDetail> getOrderList(){
        List<PurchaseDetail> list = new ArrayList<>();
    	 
            PurchaseDetail order = new PurchaseDetail();
        	order.setLoginId("yili");
        	order.setProductName("笔记本");
        	order.setPrice(new BigDecimal(22.3));
        	order.setCount(3);
        	
            list.add(order);
            PurchaseDetail order1 = new PurchaseDetail();
        	order1.setLoginId("yili");
        	order1.setProductName("笔记本1");
        	order1.setPrice(new BigDecimal(122.3));
        	order1.setCount(13);
        	
            list.add(order1);
            
            PurchaseDetail order2 = new PurchaseDetail();
        	order2.setLoginId("yili");
        	order2.setProductName("笔记本2");
        	order2.setPrice(new BigDecimal(222.3));
        	order2.setCount(32);
        	
            list.add(order2);
            
            
            PurchaseDetail order3 = new PurchaseDetail();
        	order3.setLoginId("yili");
        	order3.setProductName("笔记本3");
        	order3.setPrice(new BigDecimal(222.3));
        	order3.setCount(32);
        	
            list.add(order3);
            
            
            PurchaseDetail order4 = new PurchaseDetail();
        	order4.setLoginId("yili");
        	order4.setProductName("笔记本4");
        	order4.setPrice(new BigDecimal(222.3));
        	order4.setCount(32);
        	
            list.add(order4);
        
        return list;
    }
	
	public static List<AccountInfo> getAccountInfoList(){
		  List<AccountInfo> list = new ArrayList<AccountInfo>();
		  AccountInfo info = new AccountInfo();
		  info.setLoginId("lisi");
		  info.setUserName("李四");
		  info.setPaytype("支付寶");
		  info.setAccountNo("22222222");
		  list.add(info);
		  
		  AccountInfo info1 = new AccountInfo();
		  info1.setLoginId("lisi");
		  info1.setUserName("李四");
		  info1.setPaytype("微信");
		  info1.setAccountNo("444444444444");
		  list.add(info1);
		  
		  AccountInfo info2 = new AccountInfo();
		  info2.setLoginId("lisi");
		  info2.setUserName("李四");
		  info2.setPaytype("銀行卡");
		  info2.setAccountNo("3333333");
		  list.add(info2);
		  return list; 
	}
	
	public static List<PurchaseInfoVO2> getPurchaseInfo(){
		List<PurchaseInfoVO2> list = new ArrayList();
		PurchaseInfoVO2 vo = new PurchaseInfoVO2();
		LoginInfo info = new LoginInfo();
		info.setLoginId("lisi");
		info.setLoginName("李四");
		info.setAddress("地址。");
		info.setPhone("13333333");
		vo.setLogininfo(info);
		
		List<PurchaseDetail> pList = new ArrayList();
		PurchaseDetail p1= new PurchaseDetail();
		p1.setLoginId("lisi");
		p1.setProductName("笔记本");
		p1.setPrice(new BigDecimal("33"));
		pList.add(p1);
		
		PurchaseDetail p2= new PurchaseDetail();
		p2.setLoginId("lisi");
		p2.setProductName("电脑");
		p2.setPrice(new BigDecimal("333"));
		pList.add(p2);
		vo.setOrderList(pList);
		list.add(vo);
		 
		PurchaseInfoVO2 vo1 = new PurchaseInfoVO2();
		LoginInfo info1 = new LoginInfo();
		info1.setLoginId("zhagnsan");
		info1.setLoginName("张三");
		info1.setAddress("地址333。");
		info1.setPhone("14444");
		vo1.setLogininfo(info1);
		List<PurchaseDetail> pList1 = new ArrayList();
		PurchaseDetail p3= new PurchaseDetail();
		p3.setLoginId("zhagnsan");
		p3.setProductName("牙膏");
		p3.setPrice(new BigDecimal("33"));
		pList1.add(p3);
		
		PurchaseDetail p4= new PurchaseDetail();
		p4.setLoginId("zhagnsan");
		p4.setProductName("牙刷");
		p4.setPrice(new BigDecimal("333"));
		pList1.add(p4);
		vo1.setOrderList(pList1);
		list.add(vo1);
		return list;
	}
	
	public static List<PurchaseDetail> getAllOrderList(){
        List<PurchaseDetail> list = new ArrayList<>();
    	 
            PurchaseDetail order = new PurchaseDetail();
        	order.setLoginId("lisi");
        	order.setOrderId("1234");
        	order.setUserName("李四");
        	order.setProductName("笔记本");
        	order.setPrice(new BigDecimal(22.3));
        	order.setCount(3);
            list.add(order);
            
            PurchaseDetail order2 = new PurchaseDetail();
        	order2.setLoginId("lisi");
        	order2.setOrderId("12345");
        	order2.setUserName("李四");
        	order2.setProductName("笔记本2");
        	order2.setPrice(new BigDecimal(222.3));
        	order2.setCount(32);
            list.add(order2);
            
            PurchaseDetail order1 = new PurchaseDetail();
        	order1.setLoginId("zhangsan");
        	order1.setOrderId("4434");
        	order1.setUserName("张三");
        	order1.setProductName("笔记本1");
        	order1.setPrice(new BigDecimal(122.3));
        	order1.setCount(13); 
            list.add(order1); 
            
            PurchaseDetail order4 = new PurchaseDetail();
        	order4.setLoginId("zhangsan");
        	order4.setOrderId("7554");
        	order4.setUserName("张三");
        	order4.setProductName("笔记本4");
        	order4.setPrice(new BigDecimal(222.3));
        	order4.setCount(32); 
            list.add(order4);
            
            PurchaseDetail order5 = new PurchaseDetail();
        	order5.setLoginId("zhangsan");
        	order5.setOrderId("6666");
        	order5.setUserName("张三");
        	order5.setProductName("笔记本5");
        	order5.setPrice(new BigDecimal(2212.3));
        	order5.setCount(2); 
            list.add(order5);
            

            PurchaseDetail order3 = new PurchaseDetail();
        	order3.setLoginId("wangwu");
        	order3.setOrderId("3333333");
        	order3.setUserName("王五");
        	order3.setProductName("笔记本3");
        	order3.setPrice(new BigDecimal(222.3));
        	order3.setCount(32); 
            list.add(order3);
            
            PurchaseDetail order41 = new PurchaseDetail();
            order41.setLoginId("xiaoliu");
            order41.setOrderId("22234");
            order41.setUserName("小六");
            order41.setProductName("笔记本3");
            order41.setPrice(new BigDecimal(222.3));
            order41.setCount(32); 
            list.add(order41);
            
            
            PurchaseDetail order51 = new PurchaseDetail();
            order51.setLoginId("xiaoliu");
            order51.setOrderId("88888");
            order51.setUserName("小六");
            order51.setProductName("笔记本3");
            order51.setPrice(new BigDecimal(222.3));
            order51.setCount(32); 
            list.add(order51);
            
            
            PurchaseDetail order6 = new PurchaseDetail();
            order6.setLoginId("xiaoliu");
            order6.setOrderId("5555555");
            order6.setUserName("小六");
            order6.setProductName("笔记本3");
            order6.setPrice(new BigDecimal(222.3));
            order6.setCount(32); 
            list.add(order6);
            
            
            PurchaseDetail order7 = new PurchaseDetail();
            order7.setLoginId("xiaoliu");
            order7.setOrderId("67666666");
            order7.setUserName("小六");
            order7.setProductName("笔记本3");
            order7.setPrice(new BigDecimal(222.3));
            order7.setCount(32); 
            list.add(order7);
            
            PurchaseDetail order8 = new PurchaseDetail();
            order8.setLoginId("xiaoliu");
            order8.setOrderId("999");
            order8.setUserName("小六");
            order8.setProductName("笔记本31");
            order8.setPrice(new BigDecimal(222.3));
            order8.setCount(32); 
            list.add(order8);
            
            PurchaseDetail order9 = new PurchaseDetail();
            order9.setLoginId("xiaoqi");
            order9.setOrderId("333333");
            order9.setUserName("小七");
            order9.setProductName("笔记本31");
            order9.setPrice(new BigDecimal(222.3));
            order9.setCount(32); 
            list.add(order9);
            
            PurchaseDetail order10 = new PurchaseDetail();
            order10.setLoginId("xiaoba");
            order10.setOrderId("10000000");
            order10.setUserName("小八");
            order10.setProductName("笔记本31");
            order10.setPrice(new BigDecimal(222.3));
            order10.setCount(32); 
            list.add(order10);
            
            PurchaseDetail order11 = new PurchaseDetail();
            order11.setLoginId("xiaojiu");
            order11.setOrderId("9994");
            order11.setUserName("小九");
            order11.setProductName("笔记本31");
            order11.setPrice(new BigDecimal(222.3));
            order11.setCount(32); 
            list.add(order11);
            
            PurchaseDetail order12 = new PurchaseDetail();
            order12.setLoginId("xiaojiu");
            order12.setOrderId("4444");
            order12.setUserName("小九");
            order12.setProductName("笔记本31");
            order12.setPrice(new BigDecimal(222.3));
            order12.setCount(32); 
            list.add(order12);
            
            PurchaseDetail order13 = new PurchaseDetail();
            order13.setLoginId("xiaojiu");
            order13.setOrderId("66234");
            order13.setUserName("小九");
            order13.setProductName("笔记本31");
            order13.setPrice(new BigDecimal(222.3));
            order13.setCount(32); 
            list.add(order13);
            
            PurchaseDetail order14 = new PurchaseDetail();
            order14.setLoginId("xiaojiu");
            order14.setOrderId("234");
            order14.setUserName("小九");
            order14.setProductName("笔记本31");
            order14.setPrice(new BigDecimal(222.3));
            order14.setCount(32); 
            list.add(order14);
        
        return list;
    }
	
	public static List getUserPurchaseStat() {
		List<PurchaseStat> list = new ArrayList<>();
		PurchaseStat stat = new PurchaseStat();
		stat.setLoginId("lisi");
		stat.setUserName("李四");
		stat.setTotalPrice(new BigDecimal("133.33"));
		list.add(stat);
		PurchaseStat stat1 = new PurchaseStat();
		stat1.setLoginId("zhangsan");
		stat1.setUserName("张三");
		stat1.setTotalPrice(new BigDecimal("333.33"));
		list.add(stat1);
		PurchaseStat stat2 = new PurchaseStat();
		stat2.setLoginId("wangwu");
		stat2.setUserName("王五");
		stat2.setTotalPrice(new BigDecimal("53.33"));
		list.add(stat2);
		 return list;
	}
	
	public static List getChartList() {
		   List<PurchaseDetail> list = new ArrayList<>();
	    	 
            PurchaseDetail order = new PurchaseDetail();
	       	order.setLoginId("lisi");
	       	order.setOrderId("1234");
	       	order.setUserName("李四");
	       	order.setProductName("笔记本");
	       	order.setProductType("电子类");
	       	order.setPurchaseMonth("一月");
	       	order.setPrice(new BigDecimal(22.3));
	       	order.setCount(3);
            list.add(order);
           
            PurchaseDetail order2 = new PurchaseDetail();
	       	order2.setLoginId("lisi");
	       	order2.setOrderId("12345");
	       	order2.setUserName("李四");
	       	order2.setProductName("笔记本2");
	       	order2.setProductType("文具类");
	       	order2.setPrice(new BigDecimal(222.3));
	       	order2.setCount(32);
	       	order2.setPurchaseMonth("二月");
            list.add(order2);
            
            PurchaseDetail order1 = new PurchaseDetail();
        	order1.setLoginId("zhangsan");
        	order1.setOrderId("4434");
        	order1.setUserName("张三");
        	order1.setProductName("笔记本1");
        	order1.setPrice(new BigDecimal(122.3));
         	order1.setProductType("电子类");
	       	order1.setPurchaseMonth("一月");
        	order1.setCount(13); 
            list.add(order1); 
            
            PurchaseDetail order4 = new PurchaseDetail();
        	order4.setLoginId("zhangsan");
        	order4.setOrderId("7554");
        	order4.setUserName("张三");
        	order4.setProductName("笔记本4");
        	order4.setProductType("文具类");
        	order4.setPurchaseMonth("二月");
        	order4.setPrice(new BigDecimal(222.3));
        	order4.setCount(32); 
            list.add(order4);
            
            return list;
	}
	
	public static Map<String,String> getParentHead(){
		Map<String,String> map = new HashMap<String,String>();
		map.put("0", "文具类");
		map.put("1", "电子类");
		map.put("2", "服饰类");
		return map; 
	}
	
	
	public static List getPurchaseStatByProductType() {
		 List<Map> list = new ArrayList<>();
		 Map<String,String> map = new HashMap<String,String>();
		 map.put("loginId", "lisi");
		 map.put("userName", "李四");
		 map.put("totalPrice1", "33.33");
		 map.put("totalPrice2", "323.33");
		 map.put("totalPrice3", "323.33");
		 list.add(map);
		 Map<String,String> map1 = new HashMap<String,String>();
		 map1.put("loginId", "zhangsan");
		 map1.put("userName", "张三");
		 map1.put("totalPrice1", "11");
		 map1.put("totalPrice2", "2.00");
		 map1.put("totalPrice3", "0.00");
		 list.add(map1);
		 return list;
	}
}
